﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:s="http://schemas.microsoft.com/surface/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:cslb="clr-namespace:CircularSurfaceListBoxControlLibrary">
    <Style x:Key="CircularSurfaceListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
        <Setter Property="Padding" Value="2,0,0,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <Border x:Name="Bd" SnapsToDevicePixels="true" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="13">
                        <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>
                            <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true"/>
                                <Condition Property="Selector.IsSelectionActive" Value="false"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                            <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.InactiveCaptionTextBrushKey}}"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
	<Style x:Key="CircularSurfaceToggleButtonStyle" TargetType="{x:Type s:SurfaceToggleButton}">
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type s:SurfaceToggleButton}">
                    <Grid>
                        <Ellipse Margin="0.166,0,0.912,0.334">
                            <Ellipse.Fill>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0" MappingMode="RelativeToBoundingBox">
                                    <GradientStop Color="#58000000" Offset="1"/>
                                    <GradientStop Color="#58FFFFFF"/>
                                </LinearGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                        <Ellipse Margin="0.166,0,0.912,0.334" StrokeThickness="0.1" Opacity="0.445">
                            <Ellipse.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FF454545" Offset="1"/>
                                    <GradientStop Color="#FF6A6A6A"/>
                                </LinearGradientBrush>
                            </Ellipse.Stroke>
                        </Ellipse>
                        <Ellipse Margin="0.282,0.119,1.042,0.462" StrokeThickness="0.1" Opacity="0.29">
                            <Ellipse.Stroke>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFA3A3A3" Offset="1"/>
                                    <GradientStop Color="White"/>
                                </LinearGradientBrush>
                            </Ellipse.Stroke>
                        </Ellipse>
                        <ContentPresenter x:Name="Content" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                    </Grid>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="CircularSurfaceListBoxStyle" TargetType="{x:Type s:SurfaceListBox}">
        <Style.Resources>
            <LinearGradientBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" EndPoint="1,0.5" StartPoint="0,0.5">
                <GradientStop Color="#33000000" Offset="0"/>
                <GradientStop Color="#00000000" Offset="1"/>
            </LinearGradientBrush>
        </Style.Resources>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0,0" StartPoint="0,1">
                    <GradientStop Color="#FFA4B4BD" Offset="0"/>
                    <GradientStop Color="#FFDFE9EE" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="#4C000000"/>
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="MinWidth" Value="74"/>
        <Setter Property="MinHeight" Value="74"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
        <Setter Property="s:SurfaceScrollViewer.Elasticity" Value="0,0.4"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <cslb:RadialPanel Radius="180" ItemAlignment="Center" ItemOrientation="Upright" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <StaticResourceExtension ResourceKey="CircularSurfaceListBoxItemStyle" />
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type s:SurfaceListBox}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="ItemPresenterOpenStoryboard" FillBehavior="Stop">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                <SplineDoubleKeyFrame KeySpline="0,0,0,1" KeyTime="00:00:03" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                <SplineDoubleKeyFrame KeySpline="0,0,0,1" KeyTime="00:00:03" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
                                <SplineDoubleKeyFrame KeySpline="0,0,0,1" KeyTime="00:00:03" Value="360"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Center" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                <SplineDoubleKeyFrame KeySpline="0,0.33,0,1" KeyTime="00:00:00.5000000" Value="0.7"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:02.4000000" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Center" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                <SplineDoubleKeyFrame KeySpline="0,0.33,0,1" KeyTime="00:00:00.5000000" Value="0.7"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:02.4000000" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemPresenter" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                                <DiscreteObjectKeyFrame KeyTime="00:00:03" Value="{x:Static Visibility.Collapsed}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:00.7000000" Value="0.716"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:03" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="ItemPresenterCloseStoryboard" FillBehavior="Stop">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                <SplineDoubleKeyFrame KeyTime="00:00:03" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:03" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemPresenter" Storyboard.TargetProperty="(UIElement.Visibility)">
                                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
                                <DiscreteObjectKeyFrame KeyTime="00:00:00.6000000" Value="{x:Static Visibility.Collapsed}"/>
                                <DiscreteObjectKeyFrame KeyTime="00:00:03" Value="{x:Static Visibility.Visible}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:03" Value="180"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ItemPresenter" Storyboard.TargetProperty="(UIElement.Opacity)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:00.4000000" Value="0.654"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="0"/>
                                <SplineDoubleKeyFrame KeyTime="00:00:03" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Border x:Name="Border" Margin="{TemplateBinding Padding}" ClipToBounds="False" OpacityMask="{x:Null}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="360" Padding="0" Background="Transparent">
                        <Grid ShowGridLines="False">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0.3*"/>
                                <ColumnDefinition Width="0.5*"/>
                                <ColumnDefinition Width="0.3*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0.3*"/>
                                <RowDefinition Height="0.5*"/>
                                <RowDefinition Height="0.3*"/>
                            </Grid.RowDefinitions>
                            <ItemsPresenter x:Name="ItemPresenter" Margin="0" ClipToBounds="False" OpacityMask="{x:Null}" RenderTransformOrigin="0.5,0.5" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Visibility="Collapsed" Grid.RowSpan="3" Grid.ColumnSpan="3">
                                <ItemsPresenter.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </ItemsPresenter.RenderTransform>
                            </ItemsPresenter>
                            <s:SurfaceToggleButton x:Name="Center" HorizontalAlignment="Stretch" Style="{StaticResource CircularSurfaceToggleButtonStyle}" Margin="0" RenderTransformOrigin="0.5,0.5" Grid.Row="1" Grid.Column="1" Background="#FF218BC7" Foreground="#FF824646">
                                <s:SurfaceToggleButton.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </s:SurfaceToggleButton.RenderTransform>
                                <s:SurfaceToggleButton.BorderBrush>
                                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                                        <GradientStop Color="#7FFFFFFF" Offset="0"/>
                                        <GradientStop Color="White" Offset="1"/>
                                    </LinearGradientBrush>
                                </s:SurfaceToggleButton.BorderBrush>
                            </s:SurfaceToggleButton>
                        </Grid>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="False" SourceName="Center">
                            <Trigger.EnterActions>
                                <BeginStoryboard x:Name="ItemPresenterCloseStoryboard_BeginStoryboard" Storyboard="{StaticResource ItemPresenterCloseStoryboard}"/>
                            </Trigger.EnterActions>
                        </Trigger>
                        <Trigger Property="s:Contacts.IsAnyContactCaptured" Value="False"/>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="BorderBrush" TargetName="Border" Value="#33000000"/>
                        </Trigger>
                        <Trigger Property="IsGrouping" Value="True">
                            <Setter Property="ScrollViewer.CanContentScroll" Value="False"/>
                        </Trigger>
                        <Trigger Property="IsChecked" SourceName="Center" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource ItemPresenterOpenStoryboard}"/>
                            </Trigger.EnterActions>
                            <Setter Property="Visibility" TargetName="ItemPresenter" Value="Visible"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ScatterViewItemTransparentStyle" TargetType="{x:Type s:ScatterViewItem}">
        <Setter Property="Background">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0,0" StartPoint="0,1">
                    <GradientStop Color="#FFA4B4BD" Offset="0"/>
                    <GradientStop Color="#FFDFE9EE" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="#33000000"/>
        <Setter Property="Foreground" Value="#FF515151"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="MinWidth" Value="48"/>
        <Setter Property="MinHeight" Value="48"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type s:ScatterViewItem}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="ActivationTimeline">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
                                <SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
                                <SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
                            </DoubleAnimationUsingKeyFrames>
                            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                                <SplinePointKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:01.1000000" Value="1.182,0.441"/>
                            </PointAnimationUsingKeyFrames>
                            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
                                <SplinePointKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:01.1000000" Value="1.929,0.949"/>
                            </PointAnimationUsingKeyFrames>
                        </Storyboard>
                        <Storyboard x:Key="DeactivationTimeline">
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
                                <SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
                                <SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
                            </DoubleAnimationUsingKeyFrames>
                            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                                <SplinePointKeyFrame KeySpline="0,0,0,0" KeyTime="00:00:00" Value="1.241,0.304"/>
                                <SplinePointKeyFrame KeySpline="0,0,0.15,0.93" KeyTime="00:00:00.7500000" Value="-0.636,0.132"/>
                                <SplinePointKeyFrame KeyTime="00:00:00.7750000" Value="-1.146,-0.035"/>
                            </PointAnimationUsingKeyFrames>
                            <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
                                <SplinePointKeyFrame KeySpline="0,0,0,0" KeyTime="00:00:00" Value="1.879,0.551"/>
                                <SplinePointKeyFrame KeySpline="0,0,0.15,0.93" KeyTime="00:00:00.7500000" Value="0.018,0.291"/>
                                <SplinePointKeyFrame KeyTime="00:00:00.7750000" Value="-0.492,0.124"/>
                            </PointAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid x:Name="container" RenderTransformOrigin="{TemplateBinding RenderTransformOrigin}">
                        <Grid.RenderTransform>
                            <ScaleTransform ScaleX="1" ScaleY="1"/>
                        </Grid.RenderTransform>
                        <Border x:Name="contentBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="360" HorizontalAlignment="Stretch" Background="Transparent">
                            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        </Border>
                        <Rectangle x:Name="Sheen" RadiusX="360" RadiusY="360" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="False" IsHitTestVisible="False" Opacity="0.6">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="-0.234,0.37" StartPoint="-0.981,-0.138">
                                    <GradientStop Color="Transparent" Offset="0"/>
                                    <GradientStop Color="#33FFFFFF" Offset="0.52"/>
                                    <GradientStop Color="Transparent" Offset="1"/>
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsActive" Value="True"/>
                                <Condition Property="ShowsActivationEffects" Value="True"/>
                            </MultiTrigger.Conditions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard x:Name="DeactivationTimeline_BeginStoryboard">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
                                            <SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
                                            <SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                                            <SplinePointKeyFrame KeySpline="0,0,0,0" KeyTime="00:00:00" Value="1.241,0.304"/>
                                            <SplinePointKeyFrame KeySpline="0,0,0.15,0.93" KeyTime="00:00:00.7500000" Value="-0.636,0.132"/>
                                            <SplinePointKeyFrame KeyTime="00:00:00.7750000" Value="-1.146,-0.035"/>
                                        </PointAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
                                            <SplinePointKeyFrame KeySpline="0,0,0,0" KeyTime="00:00:00" Value="1.879,0.551"/>
                                            <SplinePointKeyFrame KeySpline="0,0,0.15,0.93" KeyTime="00:00:00.7500000" Value="0.018,0.291"/>
                                            <SplinePointKeyFrame KeyTime="00:00:00.7750000" Value="-0.492,0.124"/>
                                        </PointAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.ExitActions>
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard x:Name="ActivationTimeline_BeginStoryboard">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
                                            <SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
                                            <SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.StartPoint)">
                                            <SplinePointKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:01.1000000" Value="1.182,0.441"/>
                                        </PointAnimationUsingKeyFrames>
                                        <PointAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Sheen" Storyboard.TargetProperty="(Shape.Fill).(LinearGradientBrush.EndPoint)">
                                            <SplinePointKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:01.1000000" Value="1.929,0.949"/>
                                        </PointAnimationUsingKeyFrames>
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" TargetName="contentBorder">
                                <Setter.Value>
                                    <LinearGradientBrush EndPoint="0,0" StartPoint="0,1">
                                        <GradientStop Color="#4CA4B4BD" Offset="0"/>
                                        <GradientStop Color="#4CDFE9EE" Offset="1"/>
                                    </LinearGradientBrush>
                                </Setter.Value>
                            </Setter>
                            <Setter Property="Foreground" Value="#A5333333"/>
                            <Setter Property="BorderBrush" Value="#33000000"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>